.class public Lde/dealdoktor/app/activities/TabGroupActivity;
.super Landroid/app/ActivityGroup;
.source "TabGroupActivity.java"


# instance fields
.field public mIdList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 14
    invoke-direct {p0}, Landroid/app/ActivityGroup;-><init>()V

    return-void
.end method


# virtual methods
.method public closeChilds()V
    .locals 8

    .prologue
    .line 129
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->getLocalActivityManager()Landroid/app/LocalActivityManager;

    move-result-object v4

    .line 130
    .local v4, manager:Landroid/app/LocalActivityManager;
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    add-int/lit8 v1, v6, -0x1

    .line 131
    .local v1, index:I
    const-string v2, ""

    .line 132
    .local v2, lastId:Ljava/lang/String;
    :goto_0
    if-gtz v1, :cond_1

    .line 139
    invoke-virtual {v4, v2}, Landroid/app/LocalActivityManager;->getActivity(Ljava/lang/String;)Landroid/app/Activity;

    move-result-object v0

    .line 140
    .local v0, a:Landroid/app/Activity;
    if-eqz v0, :cond_0

    .line 141
    invoke-virtual {v0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    .line 142
    .local v3, lastIntent:Landroid/content/Intent;
    invoke-virtual {v4, v2, v3}, Landroid/app/LocalActivityManager;->startActivity(Ljava/lang/String;Landroid/content/Intent;)Landroid/view/Window;

    move-result-object v5

    .line 143
    .local v5, newWindow:Landroid/view/Window;
    invoke-virtual {v5}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v6

    invoke-virtual {p0, v6}, Lde/dealdoktor/app/activities/TabGroupActivity;->setContentView(Landroid/view/View;)V

    .line 145
    .end local v3           #lastIntent:Landroid/content/Intent;
    .end local v5           #newWindow:Landroid/view/Window;
    :cond_0
    return-void

    .line 133
    .end local v0           #a:Landroid/app/Activity;
    :cond_1
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    const/4 v7, 0x1

    invoke-virtual {v4, v6, v7}, Landroid/app/LocalActivityManager;->destroyActivity(Ljava/lang/String;Z)Landroid/view/Window;

    .line 134
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    .line 135
    add-int/lit8 v1, v1, -0x1

    .line 136
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    .end local v2           #lastId:Ljava/lang/String;
    check-cast v2, Ljava/lang/String;

    .restart local v2       #lastId:Ljava/lang/String;
    goto :goto_0
.end method

.method public finishFromChild(Landroid/app/Activity;)V
    .locals 8
    .parameter "child"

    .prologue
    const/4 v7, 0x1

    .line 34
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->getLocalActivityManager()Landroid/app/LocalActivityManager;

    move-result-object v4

    .line 35
    .local v4, manager:Landroid/app/LocalActivityManager;
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    add-int/lit8 v1, v6, -0x1

    .line 37
    .local v1, index:I
    if-ge v1, v7, :cond_1

    .line 38
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->finish()V

    .line 53
    :cond_0
    :goto_0
    return-void

    .line 42
    :cond_1
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    invoke-virtual {v4, v6, v7}, Landroid/app/LocalActivityManager;->destroyActivity(Ljava/lang/String;Z)Landroid/view/Window;

    .line 43
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    .line 44
    add-int/lit8 v1, v1, -0x1

    .line 45
    iget-object v6, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v6, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 47
    .local v2, lastId:Ljava/lang/String;
    invoke-virtual {v4, v2}, Landroid/app/LocalActivityManager;->getActivity(Ljava/lang/String;)Landroid/app/Activity;

    move-result-object v0

    .line 48
    .local v0, a:Landroid/app/Activity;
    if-eqz v0, :cond_0

    .line 49
    invoke-virtual {v0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    .line 50
    .local v3, lastIntent:Landroid/content/Intent;
    invoke-virtual {v4, v2, v3}, Landroid/app/LocalActivityManager;->startActivity(Ljava/lang/String;Landroid/content/Intent;)Landroid/view/Window;

    move-result-object v5

    .line 51
    .local v5, newWindow:Landroid/view/Window;
    invoke-virtual {v5}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v6

    invoke-virtual {p0, v6}, Lde/dealdoktor/app/activities/TabGroupActivity;->setContentView(Landroid/view/View;)V

    goto :goto_0
.end method

.method public onBackPressed()V
    .locals 7

    .prologue
    .line 105
    const-string v4, "xxx"

    const-string v5, "on Back TabGroupActivity"

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 106
    iget-object v4, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_0
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_1

    .line 109
    iget-object v4, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v2

    .line 110
    .local v2, length:I
    const/4 v4, 0x1

    if-le v2, v4, :cond_2

    .line 111
    const-string v4, "xxx"

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "stack > 1:"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 112
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->getLocalActivityManager()Landroid/app/LocalActivityManager;

    move-result-object v5

    iget-object v4, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    add-int/lit8 v6, v2, -0x1

    invoke-virtual {v4, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    invoke-virtual {v5, v4}, Landroid/app/LocalActivityManager;->getActivity(Ljava/lang/String;)Landroid/app/Activity;

    move-result-object v0

    .line 113
    .local v0, current:Landroid/app/Activity;
    if-eqz v0, :cond_0

    .line 114
    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    .line 126
    .end local v0           #current:Landroid/app/Activity;
    :cond_0
    :goto_1
    return-void

    .line 106
    .end local v2           #length:I
    :cond_1
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 107
    .local v1, id:Ljava/lang/String;
    const-string v5, "xxx"

    invoke-static {v5, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 117
    .end local v1           #id:Ljava/lang/String;
    .restart local v2       #length:I
    :cond_2
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->getParent()Landroid/app/Activity;

    move-result-object v3

    check-cast v3, Lde/dealdoktor/app/activities/Tabs;

    .line 118
    .local v3, tabs:Lde/dealdoktor/app/activities/Tabs;
    invoke-virtual {v3}, Lde/dealdoktor/app/activities/Tabs;->getCurrentTab()I

    move-result v4

    if-nez v4, :cond_3

    .line 120
    invoke-virtual {v3}, Lde/dealdoktor/app/activities/Tabs;->finish()V

    goto :goto_1

    .line 123
    :cond_3
    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Lde/dealdoktor/app/activities/Tabs;->setCurrentTab(I)V

    goto :goto_1
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "savedInstanceState"

    .prologue
    .line 20
    invoke-super {p0, p1}, Landroid/app/ActivityGroup;->onCreate(Landroid/os/Bundle;)V

    .line 21
    iget-object v0, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    .line 22
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    .line 23
    :cond_0
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 80
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 81
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->onBackPressed()V

    .line 82
    const/4 v0, 0x1

    .line 84
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/ActivityGroup;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public onKeyUp(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 93
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 94
    const/4 v0, 0x1

    .line 96
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/ActivityGroup;->onKeyUp(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public startChildActivity(Ljava/lang/String;Landroid/content/Intent;)V
    .locals 3
    .parameter "Id"
    .parameter "intent"

    .prologue
    .line 65
    const-string v1, "xxxxxx"

    const-string v2, "starting child"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 66
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TabGroupActivity;->getLocalActivityManager()Landroid/app/LocalActivityManager;

    move-result-object v1

    const/high16 v2, 0x1000

    invoke-virtual {p2, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    move-result-object v2

    invoke-virtual {v1, p1, v2}, Landroid/app/LocalActivityManager;->startActivity(Ljava/lang/String;Landroid/content/Intent;)Landroid/view/Window;

    move-result-object v0

    .line 67
    .local v0, window:Landroid/view/Window;
    if-eqz v0, :cond_0

    .line 68
    iget-object v1, p0, Lde/dealdoktor/app/activities/TabGroupActivity;->mIdList:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 69
    invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v1

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/TabGroupActivity;->setContentView(Landroid/view/View;)V

    .line 71
    :cond_0
    return-void
.end method
